package com.wicket.okrframework.integration.dto;

import com.wicket.okrframework.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import lombok.Data;

@Data
public class ObjectPropertyDto extends BaseDto implements Serializable {

  /**
   * 对象属性类型关系ID:
   */
  @ApiModelProperty("对象属性类型关系ID")
  private String objectPropertyTypeId;

  /**
   * 类型ID:
   */
  @ApiModelProperty("类型ID")
  private String typeId;

  /**
   * 类型的编码:
   */
  @ApiModelProperty("类型的编码")
  private String typeCode;

  /**
   * 类型名称:
   */
  @ApiModelProperty("类型名称")
  private String typeName;

  /**
   * 主体生命周期:
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 是否存档:
   */
  @ApiModelProperty("是否存档")
  private String isArchive;

  /**
   * 排序:
   */
  @ApiModelProperty("排序")
  private String orderNumber;

  /**
   * 操作人就职记录ID:
   */
  @ApiModelProperty("操作人就职记录ID")
  private String operationInductionId;

  /**
   * 操作时间:
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    ObjectPropertyDto that = (ObjectPropertyDto) o;
    return (
      objectPropertyTypeId == that.objectPropertyTypeId &&
      typeId == that.typeId &&
      typeCode == that.typeCode &&
      typeName == that.typeName &&
      subjectLifeCycle == that.subjectLifeCycle &&
      isArchive == that.isArchive &&
      orderNumber == that.orderNumber &&
      operationInductionId == that.operationInductionId &&
      operateTime == that.operateTime
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      objectPropertyTypeId,
      typeId,
      typeCode,
      typeName,
      subjectLifeCycle,
      isArchive,
      orderNumber,
      operationInductionId,
      operateTime
    );
  }
}
